import { createStore, applyMiddleware } from "redux"
import thunk from "redux-thunk"
import logger from "redux-logger"
import {ALLSTATE} from "../types/store.d"
const initialState = {
    list:[],
}

const reducer = (state:ALLSTATE = initialState, action: any) => {
    switch (action.type) {
        case "setList":
            return { ...state,arr:action.payload}
            default:
                return state
    };
}

const store=createStore(reducer,applyMiddleware(thunk,logger))
export default store


